package com.xingy.cloud.bean;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
import org.springframework.lang.NonNull;

/**
 * @author xinguiyuan
 * @className com.xingy.cloud.bean.MyRoutingDataSource
 * @date 2019/07/31 18:45
 * @description 获取路由key
 */
public class MyRoutingDataSource extends AbstractRoutingDataSource {

    @NonNull
    @Override
    protected Object determineCurrentLookupKey() {
        return DBContextHolder.get();
    }
}
